<template>
    <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
    >
        <el-menu-item
            v-for="(item,index) in navTwo"
            :key="index+'a'"
            @click="handleToPage(index)"
            :active-text-color="'#00796a'"
        >
            <i :class="navIcon[index]"></i>
            <span slot="title">{{item}}</span>
        </el-menu-item>
    </el-menu>
</template>
<script>
export default {
    props: {},
    data() {
        return {
            navTwo: ['电线电缆', '铁塔', '变压器', '电阻器', '电表', '其他电器'],
            navIcon: [
                'el-icon-s-opportunity',
                'el-icon-s-data',
                'el-icon-s-finance',
                'el-icon-s-data',
                'el-icon-s-marketing',
                'el-icon-s-management',
                'el-icon-s-shop',
            ],
            navRouter: ['/Fine', '/cable', '/meter', '/resistor', '/tower', '/transformer', '/Other'],
        }
    },
    methods: {
        handleToPage(index) {
            this.$router.push(this.navRouter[index])
        },
        handleOpen() {},
        handleClose() {},
    },
}
</script>
<style lang="scss" scoped>
.el-menu {
    border: 1px solid #e6e6e6;
    padding-bottom: 20px;
    padding-top: 20px;
    font-size: 12px;
}
.el-menu-vertical-demo {
    width: 182px;
}
.el-menu-item.is-active {
    color: #00796a !important;
}
.el-menu-item,
.el-submenu__title {
    height: 42px !important;
    line-height: 42px !important;
}
</style>
